1. Field of the Invention
This invention relates to a quantization unit setting apparatus, a quantization unit setting method, a coding apparatus, a coding method, and an information record medium and more particularly to a quantization unit setting apparatus and a quantization unit setting method for performing more precise quantization processing, a coding apparatus and a coding method containing the quantization unit setting apparatus, and an information record medium recording a quantization unit setting program or a coding program as a computer-readable medium.
2. Description of the Related Art
In recent years, as a coding processing standard for compressing and coding image information containing a still image or a moving image, MPEG (Moving Picture Experts Group) has been standardized as international standard.
At this time, in order to code image information, it is a common practice to perform so-called quantization processing for image information as a preceding stage of coding the image information. The quantization processing is executed by dividing the luminance signal value or the color-difference signal value for each of pixels (or for each of pixel units each containing a preset number of pixels) making up the image information by a quantization unit (generally, called a quantizer scale or quantization step width in some cases, for example, in above-mentioned MPEG. Hereinafter, the quantization unit will be called a quantizer scale whenever necessary).
In coding processing of the MPEG, etc., in the related art, as the method of determining the value of the quantization unit, simply the more complicated the image information contents, the larger the value assigned to the quantization unit in the allowable range preset for the value of the quantization unit.
However, in the described coding processing in the related art, simply the more complicated the image information contents, the larger the value assigned to the quantization unit and thus so-called quantization noise (generally, called quantization error in some cases) may grow exceeding the allowable range and consequently, proper quantization processing is not executed and as a result, precise coding processing cannot be performed; this is a problem.
It is therefore an object of the invention to provide a quantization unit setting apparatus and a quantization unit setting method for performing appropriate quantization processing for lessening a quantization error, thereby consequently making it possible to execute coding processing with high accuracy, a coding apparatus and a coding method containing the quantization unit setting apparatus, and an information record medium recording a quantization unit setting program or a coding program as a computer-readable medium.
To solve the above-described problems, there is provided a quantization unit setting apparatus for setting a quantization unit used when information is quantized, the quantization unit setting apparatus comprising a precalculator of an adder, etc., for making a precalculation of a quantization error occurring when the information is quantized using a plurality of quantization units for each of the quantization units, and a setting section of an error control section, etc., for setting the quantization unit used for quantizing the information from among the plurality of quantization units based on the quantization errors whose precalculation is made.
Thus, the quantizer unit actually used for quantization is set based on the quantization errors whose precalculation is made corresponding to a plurality of quantizer units, so that the information can be quantized appropriately considering the quantization errors.
In the quantization unit setting apparatus, the precalculator comprises a quantization section for quantizing the information using one of the quantization units for generating quantization information, an inverse quantization section for inversely quantizing the quantization information generated by the quantization section using the one quantization unit for generating inverse quantization information, and a quantization error calculation section for calculating the difference between the inverse quantization information generated by the inverse quantization section and the original information as the quantization error corresponding to the one quantization unit.
Thus, the inverse quantization information provided by inversely quantizing the quantization information generated using one quantizer unit based on the quantizer unit is compared with the original information and the quantization error is calculated, so that the precisely calculated quantization error can be used to set the quantizer unit used for quantization.
In the quantization unit setting apparatus, the setting section comprises a determination section of a comparison section, etc., for determining whether or not the value of the quantization error whose precalculation is made corresponding to the one quantization unit is less than a threshold value set based on the time average of dispersion of the quantization errors, and a controller of an error control section, etc., for repeating controlling the precalculator so as to make a precalculation of the quantization error corresponding to another one of the quantization units only when the value of the quantization error is not less than the threshold value, wherein when the value of the quantization error becomes less than the threshold value, the setting section sets the quantization unit so as to quantize the information using the quantization unit corresponding to the quantization error having the value becoming less than the threshold value.
Thus, when the quantization error value corresponding to one quantizer unit becomes less than the threshold value, the quantizer unit is used to quantize the information, so that the calculation amount for setting the quantizer unit can be decreased.
In the quantization unit setting apparatus, the setting section sets the quantization unit so as to quantize the information using the quantization unit corresponding to the smallest one of the quantization errors whose precalculation is made.
Thus, the quantization unit is set so as to use the quantization unit with the smallest quantization error to quantize the information, so that the information can be quantized with higher quality.
To solve the above-described problems, there is provided a coding apparatus comprising a quantization unit setting apparatus, a quantization section of a quantization section, etc., for quantizing the information using the setup quantization unit for generating quantization information, and an information coding section of a variable-length coding section, etc., for coding the quantization information generated by the quantization section to generate coded information.
Thus, the quantization information appropriately quantized considering the quantization noise is used to code the original information, so that the information can be coded with higher accuracy.
To solve the above-described problems, there is provided a quantization unit setting method for setting a quantization unit used when information is quantized, the quantization unit setting method comprising the precalculation step of making a precalculation of a quantization error occurring when the information is quantized using a plurality of quantization units for each of the quantization units and the setting step of setting the quantization unit used for quantizing the information from among the plurality of quantization units based on the quantization errors whose precalculation is made.
Thus, the quantizer unit actually used for quantization is set based on the quantization errors whose precalculation is made corresponding to a plurality of quantizer units, so that the information can be quantized appropriately considering the quantization errors.
In the quantization unit setting method, the precalculation step comprises the quantization step of quantizing the information using one of the quantization units for generating quantization information, the inverse quantization step of inversely quantizing the generated quantization information using the one quantization unit for generating inverse quantization information, and the quantization error calculation step of calculating the difference between the generated inverse quantization information and the original information as the quantization error corresponding to the one quantization unit.
Thus, the inverse quantization information provided by inversely quantizing the quantization information generated using one quantizer unit based on the quantizer unit is compared with the original information and the quantization error is calculated, so that the precisely calculated quantization error can be used to set the quantizer unit used for quantization.
In the quantization unit setting method, the setting section comprises the determination step of determining whether or not the value of the quantization error whose precalculation is made corresponding to the one quantization unit is less than a threshold value set based on the time average of dispersion of the quantization errors, and the control step of repeating controlling so as to make a precalculation of the quantization error corresponding to another one of the quantization units only when the value of the quantization error is not less than the threshold value, wherein when the value of the quantization error becomes less than the threshold value, the quantization unit corresponding to the quantization error having the value becoming less than the threshold value is used to quantize the information.
Thus, when the quantization error value corresponding to one quantizer unit becomes less than the threshold value, the quantizer unit is used to quantize the information, so that the calculation amount for setting the quantizer unit can be decreased.
In the quantization unit setting method, in the setting step, the quantization unit is set so as to quantize the information using the quantization unit corresponding to the smallest one of the quantization errors whose precalculation is made.
Thus, the quantization unit is set so as to use the quantization unit with the smallest quantization error to quantize the information, so that the information can be quantized with higher quality.
According to the invention, there is provided a coding method comprising a quantization unit setting method, the quantization step of quantizing the information using the setup quantization unit for generating quantization information, and the information coding step of coding the generated quantization information to generate coded information.
Thus, the quantization information appropriately quantized considering the quantization noise is used to code the original information, so that the information can be coded with higher accuracy.
According to the invention, there is provided an information record medium recording a quantization unit setting program for causing a computer contained in a quantization unit setting apparatus for setting a quantization unit used when information is quantized, to function as a precalculator for making a precalculation of a quantization error occurring when the information is quantized using a plurality of quantization units for each of the quantization units, and a setting section for setting the quantization unit used for quantizing the information from among the plurality of quantization units based on the quantization errors whose precalculation is made, the information record medium being readable by the computer.
Thus, the computer functions so as to set the quantizer unit actually used for quantization based on the quantization errors whose precalculation is made corresponding to a plurality of quantizer units, so that the information can be quantized appropriately considering the quantization errors.
In the information record medium recording the quantization unit setting program for causing the computer functioning as the precalculator to function as a quantization section for quantizing the information using one of the quantization units for generating quantization information, an inverse quantization section for inversely quantizing the quantization information generated by the quantization section using the one quantization unit for generating inverse quantization information, and a quantization error calculation section for calculating the difference between the inverse quantization information generated by the inverse quantization section and the original information as the quantization error corresponding to the one quantization unit, the information record medium being readable by the computer.
Thus, the computer functions so as to compare the inverse quantization information provided by inversely quantizing the quantization information generated using one quantizer unit based on the quantizer unit with the original information and the quantization error is calculated, so that the precisely calculated quantization error can be used to set the quantizer unit used for quantization.
In the information record medium recording the quantization unit setting program for causing the computer functioning as the setting section to function as a determination section for determining whether or not the value of the quantization error whose precalculation is made corresponding to the one quantization unit is less than a threshold value set based on the time average of dispersion of the quantization errors, and a controller for repeating controlling the precalculator so as to make a precalculation of the quantization error corresponding to another one of the quantization units only when the value of the quantization error is not less than the threshold value, for also casing the computer to function, when the value of the quantization error becomes less than the threshold value, so as to set the quantization unit so as to quantize the information using the quantization unit corresponding to the quantization error having the value becoming less than the threshold value, the information record medium being readable by the computer.
Thus, when the quantization error value corresponding to one quantizer unit becomes less than the threshold value, the computer functions so as to use the quantizer unit to quantize the information, so that the calculation amount for setting the quantizer unit can be decreased.
In the information record medium recording the quantization unit setting program for causing the computer functioning as the setting section to function so as to set the quantization unit so as to quantize the information using the quantization unit corresponding to the smallest one of the quantization errors whose precalculation is made, the information record medium being readable by the computer.
Thus, the computer functions so as to set the quantization unit so as to use the quantization unit with the smallest quantization error to quantize the information, so that the information can be quantized with higher quality. Thus, use the quantizer unit with the smallest quantization error to quantize the information, so that the information can be quantized with higher quality.
According to the invention, there is provided an information record medium recording a quantization unit setting program, and a coding program for causing a coding computer contained in a coding apparatus to function as a quantization section for quantizing the information using the setup quantization unit for generating quantization information, and an information coding section for coding the quantization information generated by the quantization section to generate coded information, the information record medium being readable by the computer and the coding computer.
Thus, the coding computer functions so as to use the quantization information appropriately quantized considering the quantization noise to code the original information, so that the information can be coded with higher accuracy.